Optimal. Leaf size=131 \[ \frac {d \left (3 b^2 c^2-3 a b c d+a^2 d^2\right ) (a+b x)^{1+n}}{b^3 (1+n)}+\frac {d^2 (3 b c-2 a d) (a+b x)^{2+n}}{b^3 (2+n)}+\frac {d^3 (a+b x)^{3+n}}{b^3 (3+n)}-\frac {c^3 (a+b x)^{1+n} \, _2F_1\left (1,1+n;2+n;1+\frac {b x}{a}\right )}{a (1+n)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 131, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {90, 67}
\begin {gather*} \frac {d \left (a^2 d^2-3 a b c d+3 b^2 c^2\right ) (a+b x)^{n+1}}{b^3 (n+1)}+\frac {d^2 (3 b c-2 a d) (a+b x)^{n+2}}{b^3 (n+2)}+\frac {d^3 (a+b x)^{n+3}}{b^3 (n+3)}-\frac {c^3 (a+b x)^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {b x}{a}+1\right )}{a (n+1)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 67
Rule 90
Rubi steps
\begin {align*} \int \frac {(a+b x)^n (c+d x)^3}{x} \, dx &=\int \left (\frac {d \left (3 b^2 c^2-3 a b c d+a^2 d^2\right ) (a+b x)^n}{b^2}+\frac {c^3 (a+b x)^n}{x}+\frac {d^2 (3 b c-2 a d) (a+b x)^{1+n}}{b^2}+\frac {d^3 (a+b x)^{2+n}}{b^2}\right ) \, dx\\ &=\frac {d \left (3 b^2 c^2-3 a b c d+a^2 d^2\right ) (a+b x)^{1+n}}{b^3 (1+n)}+\frac {d^2 (3 b c-2 a d) (a+b x)^{2+n}}{b^3 (2+n)}+\frac {d^3 (a+b x)^{3+n}}{b^3 (3+n)}+c^3 \int \frac {(a+b x)^n}{x} \, dx\\ &=\frac {d \left (3 b^2 c^2-3 a b c d+a^2 d^2\right ) (a+b x)^{1+n}}{b^3 (1+n)}+\frac {d^2 (3 b c-2 a d) (a+b x)^{2+n}}{b^3 (2+n)}+\frac {d^3 (a+b x)^{3+n}}{b^3 (3+n)}-\frac {c^3 (a+b x)^{1+n} \, _2F_1\left (1,1+n;2+n;1+\frac {b x}{a}\right )}{a (1+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.14, size = 117, normalized size = 0.89 \begin {gather*} (a+b x)^{1+n} \left (\frac {d \left (3 b^2 c^2-3 a b c d+a^2 d^2\right )}{b^3 (1+n)}+\frac {d^2 (3 b c-2 a d) (a+b x)}{b^3 (2+n)}+\frac {d^3 (a+b x)^2}{b^3 (3+n)}-\frac {c^3 \, _2F_1\left (1,1+n;2+n;\frac {a+b x}{a}\right )}{a+a n}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.02, size = 0, normalized size = 0.00 \[\int \frac {\left (b x +a \right )^{n} \left (d x +c \right )^{3}}{x}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 600 vs.
\(2 (116) = 232\).
time = 4.67, size = 993, normalized size = 7.58 \begin {gather*} - \frac {b^{n} c^{3} n \left (\frac {a}{b} + x\right )^{n} \Phi \left (1 + \frac {b x}{a}, 1, n + 1\right ) \Gamma \left (n + 1\right )}{\Gamma \left (n + 2\right )} - \frac {b^{n} c^{3} \left (\frac {a}{b} + x\right )^{n} \Phi \left (1 + \frac {b x}{a}, 1, n + 1\right ) \Gamma \left (n + 1\right )}{\Gamma \left (n + 2\right )} + 3 c^{2} d \left (\begin {cases} a^{n} x & \text {for}\: b = 0 \\\frac {\begin {cases} \frac {\left (a + b x\right )^{n + 1}}{n + 1} & \text {for}\: n \neq -1 \\\log {\left (a + b x \right )} & \text {otherwise} \end {cases}}{b} & \text {otherwise} \end {cases}\right ) + 3 c d^{2} \left (\begin {cases} \frac {a^{n} x^{2}}{2} & \text {for}\: b = 0 \\\frac {a \log {\left (\frac {a}{b} + x \right )}}{a b^{2} + b^{3} x} + \frac {a}{a b^{2} + b^{3} x} + \frac {b x \log {\left (\frac {a}{b} + x \right )}}{a b^{2} + b^{3} x} & \text {for}\: n = -2 \\- \frac {a \log {\left (\frac {a}{b} + x \right )}}{b^{2}} + \frac {x}{b} & \text {for}\: n = -1 \\- \frac {a^{2} \left (a + b x\right )^{n}}{b^{2} n^{2} + 3 b^{2} n + 2 b^{2}} + \frac {a b n x \left (a + b x\right )^{n}}{b^{2} n^{2} + 3 b^{2} n + 2 b^{2}} + \frac {b^{2} n x^{2} \left (a + b x\right )^{n}}{b^{2} n^{2} + 3 b^{2} n + 2 b^{2}} + \frac {b^{2} x^{2} \left (a + b x\right )^{n}}{b^{2} n^{2} + 3 b^{2} n + 2 b^{2}} & \text {otherwise} \end {cases}\right ) + d^{3} \left (\begin {cases} \frac {a^{n} x^{3}}{3} & \text {for}\: b = 0 \\\frac {2 a^{2} \log {\left (\frac {a}{b} + x \right )}}{2 a^{2} b^{3} + 4 a b^{4} x + 2 b^{5} x^{2}} + \frac {3 a^{2}}{2 a^{2} b^{3} + 4 a b^{4} x + 2 b^{5} x^{2}} + \frac {4 a b x \log {\left (\frac {a}{b} + x \right )}}{2 a^{2} b^{3} + 4 a b^{4} x + 2 b^{5} x^{2}} + \frac {4 a b x}{2 a^{2} b^{3} + 4 a b^{4} x + 2 b^{5} x^{2}} + \frac {2 b^{2} x^{2} \log {\left (\frac {a}{b} + x \right )}}{2 a^{2} b^{3} + 4 a b^{4} x + 2 b^{5} x^{2}} & \text {for}\: n = -3 \\- \frac {2 a^{2} \log {\left (\frac {a}{b} + x \right )}}{a b^{3} + b^{4} x} - \frac {2 a^{2}}{a b^{3} + b^{4} x} - \frac {2 a b x \log {\left (\frac {a}{b} + x \right )}}{a b^{3} + b^{4} x} + \frac {b^{2} x^{2}}{a b^{3} + b^{4} x} & \text {for}\: n = -2 \\\frac {a^{2} \log {\left (\frac {a}{b} + x \right )}}{b^{3}} - \frac {a x}{b^{2}} + \frac {x^{2}}{2 b} & \text {for}\: n = -1 \\\frac {2 a^{3} \left (a + b x\right )^{n}}{b^{3} n^{3} + 6 b^{3} n^{2} + 11 b^{3} n + 6 b^{3}} - \frac {2 a^{2} b n x \left (a + b x\right )^{n}}{b^{3} n^{3} + 6 b^{3} n^{2} + 11 b^{3} n + 6 b^{3}} + \frac {a b^{2} n^{2} x^{2} \left (a + b x\right )^{n}}{b^{3} n^{3} + 6 b^{3} n^{2} + 11 b^{3} n + 6 b^{3}} + \frac {a b^{2} n x^{2} \left (a + b x\right )^{n}}{b^{3} n^{3} + 6 b^{3} n^{2} + 11 b^{3} n + 6 b^{3}} + \frac {b^{3} n^{2} x^{3} \left (a + b x\right )^{n}}{b^{3} n^{3} + 6 b^{3} n^{2} + 11 b^{3} n + 6 b^{3}} + \frac {3 b^{3} n x^{3} \left (a + b x\right )^{n}}{b^{3} n^{3} + 6 b^{3} n^{2} + 11 b^{3} n + 6 b^{3}} + \frac {2 b^{3} x^{3} \left (a + b x\right )^{n}}{b^{3} n^{3} + 6 b^{3} n^{2} + 11 b^{3} n + 6 b^{3}} & \text {otherwise} \end {cases}\right ) - \frac {b b^{n} c^{3} n x \left (\frac {a}{b} + x\right )^{n} \Phi \left (1 + \frac {b x}{a}, 1, n + 1\right ) \Gamma \left (n + 1\right )}{a \Gamma \left (n + 2\right )} - \frac {b b^{n} c^{3} x \left (\frac {a}{b} + x\right )^{n} \Phi \left (1 + \frac {b x}{a}, 1, n + 1\right ) \Gamma \left (n + 1\right )}{a \Gamma \left (n + 2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (a+b\,x\right )}^n\,{\left (c+d\,x\right )}^3}{x} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________